1. Field of the Invention
This invention relates to a measuring apparatus which delivers a signal indicative of a measured value to an external device via a signal line, a signal outputting method, and a storage medium storing a program for implementing the method.
2. Prior Art
Conventionally, there has been proposed a counter having a gauge connected thereto for measuring the amount of displacement of an object to be measured, the counter counting pulses of a pulse signal outputted from the gauge and then delivering the count value to an external device at a high speed by parallel transmission via a plurality of signal lines.
According to the counter, in the case of transmitting 6-digit BCD (binary-coded decimal) data in parallel, for instance, four signal lines are used per digit, which means that the parallel transmission requires twenty-four (=6(digit)xc3x974(lines)) signal lines.
As is apparent from the above case, the conventional counter requires the use of a large number of signal lines for parallel transmission of data, and hence, when a plurality of counters are connected to one sequencer, the handling of signal lines is complicated, which degrades the manipulability of the counters.
To provide a solution to this problem, attempts have been made to substantially reduce the number of signal lines by converting digital data to analog voltage by a D/A converter arranged within a counter, and delivering an analog voltage signal from the D/A converter to an external device via a single signal line.
However, this method of connecting between the counter and the external device by the single signal line to thereby send the analog voltage signal from the former to the latter has not been employed for the signal transmission which requires high accuracy, due to the following disadvantages:
Compared with the dynamic range of the gauge which is capable of measuring the amount of displacement of an object to be measured, with high accuracy, that of the D/A converter for converting digital data to analog voltage is narrower, so that it has conventionally been impossible to obtain analog voltages with a high resolution over the whole measuring range of the gauge.
For instance, assuming that the gauge has a resolution of a minimum travel distance of 0.1 xcexcm and a whole measuring range of 10 mm, the dynamic range of the gauge is 10 mm/0.1 xcexcm=100000 (=50 dB), whereas if the D/A converter has a minimum step voltage of 10 mV and a maximum output voltage of 10 V, the dynamic range of the D/A converter is 10 V/10 mV=1000 (=30 dB), which is {fraction (1/100)} as large as that of the gauge.
FIG. 1 shows the relationship between the travel distance of the gauge and the output voltage of the D/A converter, according to the prior art. Assuming that a measuring range in which a target voltage 1 is obtained when the travel distance is equal to a target value 1 is set as indicated by xe2x80x9caxe2x80x9d in the figure, so long as the travel distance is within the measuring range a, a change in the output voltage relative to a change in the travel distance is large, which enables the measurement of displacement of an object to be measured, with a high resolution, whereas when the travel distance of the gauge reaches a target value 2, the output voltage of the D/A converter has already been saturated, so that it is impossible to obtain an output voltage corresponding to the travel distance.
On the other hand, when the measuring range is set widely as indicated by xe2x80x9cbxe2x80x9d in the figure, it is possible to obtain the target voltages 1 and 2 corresponding to the respective target values 1 and 2, but a change in the output voltage relative to a change in the travel distance is smaller, which does not allow measurement with a high resolution.
As described above, according to the prior art, the dynamic range of the D/A converter is narrower than that of the gauge. Consequently, when the amount of displacement (travel distance) measured by the gauge is converted to an output voltage by the D/A converter and delivered to the external device via the single signal line, it is impossible to secure a high resolution over the whole measuring range of the gauge.
It is an object of the invention to provide a measuring apparatus and a signal outputting method which are constructed such that an analog signal indicative of the difference between a target value and a measured value obtained by a gauge is outputted to an external device via a single signal line, while securing a required resolution over the whole measuring range of the gauge, as well as a storage medium storing a program for implementing the signal outputting method.
To attain the above object, according to a first aspect of the invention, there is provided a measuring apparatus comprising a plurality of target value-setting means storing different target values, respectively, target value-selecting means for selecting-at least one target value-setting means from the plurality of target value-setting means, difference-calculating means for calculating a difference between a target value stored in the selected at least one target value-setting means and a measured value of an object to be measured, analog signal conversion means for converting the calculated difference to an analog signal, and output means for outputting the analog signal to an external device via a reduced number of signal lines.
According to the present invention, it is possible to secure a required resolution over the whole measuring range of the gauge in outputting an analog signal to the external device via the single signal line. As a result, the number of signal lines can be reduced, so that when a plurality of measuring apparatuses are connected to an external device via signal lines, the handling of the signal lines is facilitated, which enhances the manipulability of the measuring apparatuses.
Preferably, the analog signal conversion means comprises digital-to-analog conversion means for converting digital data indicative of the calculated difference to an analog voltage signal, and the target value-selecting means selects at least one of the plurality of target value-setting means that stores such a target value that the analog voltage signal is not saturated.
Preferably, the measuring apparatus is connected to a gauge arranged in contact with the object to be measured for displacement together with the object, for outputting a pulse signal indicative of an amount of displacement of the object, and the plurality of target value-setting means store a plurality of respective different target values covering a whole measuring range of the gauge.
Preferably, the target value-selecting means selects one of the plurality of target value-setting means that corresponds to a value of a selection signal from the external device.
Alternatively, the measuring apparatus comprises selection signal-generating means that generates a signal for selecting one of the plurality of target value-setting means, and the target value-selecting means selects one of the plurality of target value-setting means that corresponds to a value of the signal generated by the selection signal-generating means.
Preferably, the output means outputs the analog signal via a single signal line.
To attain the above object, according to a second aspect of the invention, there is provided a signal outputting method comprising the steps of setting a plurality of different target values to a plurality of target value-setting means, respectively, selecting at least one target value-setting means from the plurality of target value-setting means, calculating a difference between a target value stored in the selected at least one target value-setting means and a measured value of an object to be measured, converting the calculated difference to an analog signal, and outputting the analog signal to an external device via a reduced number of signal lines.
To attain the above object, according to a third aspect of the invention, there is provided a machine readable storage medium storing instructions of a program for causing a computer to execute a signal outputting method comprising the steps of setting a plurality of different target values to a plurality of target value-setting means, respectively, selecting at least one target value-setting means from the plurality of target value-setting means, calculating a difference between a target value stored in the selected at least one target value-setting means and a measured value of an object to be measured, converting the calculated difference to an analog signal, and outputting the analog signal to an external device via a reduced number of signal lines.
The above and other objects, features, and advantages of the invention will become more apparent from the following detailed description taken in conjunction with the accompanying drawings.